#include <stdio.h>

/* 
 * 检测变量类型是否相同
 * (void) (&_min1 == &_min2);
 */
#define min(x, y) ({                      \
    typeof(x) _min1 = (x);                \
    typeof(y) _min2 = (y);                \
    (void) (&_min1 == &_min2);            \
    _min1 < _min2 ? _min1 : _min2; })

int main ()
{
    int  i;
    int  j;
    //unsigned int j;
    //unsigned short j;
    //unsigned char j;
    printf("ret = %d\n", min(i, j));
    return 0;
}
